package com.ayu.shortlink.admin.common.constant;

/**
 * 用户后端 Redis的常量
 */
public class RedisCacheConstant {

    /**
     * 用户注册分布式锁
     */
    public static final String LOCK_USER_REGISTER_KEY = "short-link:user_register_lock:";

    /**
     * 分组创建分布式锁
     */
    public static final String LOCK_GROUP_CREATE_KEY = "short-link:group_create_lock:%s";

    /**
     * 延迟队列的KEY
     */
    public static final String DELAY_EXECUTOR_SAFE_KEY = "short-link:delay_executor_safe_lock";

    /**
     * 优惠券模版存量的Key
     */
    public final static String COUPON_TEMPLATE_CAPACITY_KEY = "short-link:coupon_distribute_save:%s";

    /**
     * 存储优惠券模版是否存在的布隆过滤器KEY
     */
    public final static String COUPON_TEMPLATE_EXIST_KEY = "short-link:coupon_template_exist:%s";

    /**
     * 存储优惠券模版信息的 KEY
     */
    public final static String COUPON_TEMPLATE_KEY = "short-link:coupon_template:%s";

    /**
     * 查询优惠券模版的分布式锁
     */
    public final static String LOCK_FIND_COUPON_TEMPLATE = "short-link:find_coupon_template:%s";

    /**
     * 修改优惠券数量的读写锁
     */
    public final static String LOCK_COUPON_TEMPLATE_STOCK_CHANGE = "short-link:coupon_template_stock_change:%s";
}
